<!DOCTYPE html>
<html lang="zh"xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>首页 - 天才(genius)后台管理系统</title>
<link rel="icon" th:href="@{favicon.ico}" type="image/ico">
  <link href="css/bootstrap.min.css" th:href="@{~/css/bootstrap.min.css}" rel="stylesheet">
  <link href="css/materialdesignicons.min.css" th:href="@{~/css/materialdesignicons.min.css}" rel="stylesheet">
  <link href="css/style.min.css" th:href="@{~/css/style.min.css}" rel="stylesheet">

</head>

<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <!--左侧导航-->
    <aside th:include="left::common" class="lyear-layout-sidebar">
    </aside>
    <!--End 左侧导航-->
    <!--头部信息-->
    <header th:include="head :: common" class="lyear-layout-header">
    </header>
    <!--End 头部信息-->
    <!--页面主要内容-->
    <main class="lyear-layout-content">
      <div class="col-md-12">
        <div class="card">
          <div class="card-header"><h4>试题列表</h4></div>
          <form id="biao" action="/study-test-questions-one/studyQuestionsList" method="post">
          <input type="hidden" th:value="${pInfoOne.pageNum}" id="pnone" name="pnone" />
          <input type="hidden" value="" id="paginalsizeone" name="paginalsizeone" />
          <input type="hidden" value="" id="oneval" name="oneval" />
          <input type="hidden" th:value="${pInfoMore.pageNum}" id="pnmore" name="pnmore" />
          <input type="hidden" value="" id="paginalsizemore" name="paginalsizemore" />
          <input type="hidden" value="" id="moreval" name="moreval" />
          <input type="hidden" th:value="${pInfoShor.pageNum}" id="pnshort" name="pnshort" />
          <input type="hidden" value="" id="paginalsizeshort" name="paginalsizeshort" />
          <input type="hidden" value="" id="shoreval" name="shoreval" />
          <input type="hidden" value="" id="oms" name="oms"/>
        </form>
          <div class="card-body">

            <ul class="nav nav-tabs nav-justified">
              <li th:class="${#strings.equals(oms,'one')?'active':''}">
                <a data-toggle="tab" href="#home-basic">单选</a>
              </li>
              <li  th:class="${#strings.equals(oms,'more')?'active':''}" class="nav-item">
                <a data-toggle="tab" href="#profile-basic">多选</a>
              </li>
              <li  th:class="${#strings.equals(oms,'shore')?'active':''}" class="nav-item">
                <a data-toggle="tab" href="#messages-basic">简答</a>
              </li>
            </ul>
            <div class="tab-content">
              <!--单选!-->
              <div th:class="${#strings.equals(oms,'one')?'tab-pane fade active in':'tab-pane fade'}" class="tab-pane fade " id="home-basic">
                <div class="row">
                  <div class="col-md-2">
                    <label >每页显示展示数量</label>
                  </div>
                  <div class="col-md-2">
                    <div class="form-group">
                      <select id="paginalsizeone1" class="form-control js_select2" name="example-1" >
                        <option value="">请选择</option>
                        <option th:selected="${paginalsizeone==i}?'selected'" th:each="i:${#numbers.sequence(1,100)}">[[${i}]]</option>
                      </select>
                    </div>
                  </div>
                  <div class="col-md-2">
                    <label >根据题目模糊查</label>
                  </div>
                  <div class="col-md-2">
                    <input class="form-control" type="text"  id="oneval1" placeholder="题目">
                  </div>
                  <div class="col-md-2">
                    <button onclick="ymone(1)" class="btn btn-w-md btn-round btn-success">确定</button>
                  </div>
                </div>
                <table class="table">
                  <thead>
                  <tr>
                    <th>#</th>
                    <th>题目</th>
                    <th>答案</th>
                    <th>操作</th>
                  </tr>
                  </thead>
                  <tbody th:each="one:${pInfoOne.list}">
                    <th th:text="${one.id}"></th>
                    <td th:text="${one.testQuestionsOneOpic}"></td>
                    <td th:text="${one.testQuestionsOneAnswer}">   </td>
                    <td>
                    <div class="btn-group">
                        <a class="btn btn-xs btn-default" th:href="@{/study-test-questions-one/upd(id=${one.id})}" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                        <a class="btn btn-xs btn-default" th:href="@{/study-test-questions-one/del(id=${one.id})}" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a>
                    </div>
                    </td>
                  </tbody>
                </table>
                <nav>
                  <div class="col-md-4">总记录数[[${pInfoOne.total}]] [[${pInfoOne.pageNum}]]/
                    [[${pInfoOne.pages}]]页</div>
                  <ul class="pagination pagination-circle">
                    <li th:class="${pInfoOne.isFirstPage}?'disabled'" >
                      <a href="javascript:;"  th:onclick="'ymone('+${pInfoOne.prePage}+')'">
                        <span><i class="mdi mdi-chevron-left"></i></span>
                      </a>
                    </li>
                    <li th:class="${page_Num==pInfoOne.pageNum}?'active':''" th:each="page_Num:${pInfoOne.navigatepageNums}">
                      <a  th:onclick="'ymone('+${page_Num}+')'" href="javascript:;">[[${page_Num}]]</a>
                    </li>

                    <li th:class="${pInfoOne.isLastPage}?'disabled'">
                      <a href="javascript:;" th:onclick="'ymone('+${pInfoOne.nextPage}+')'">
                        <span><i class="mdi mdi-chevron-right"></i></span>
                      </a>
                    </li>

                  </ul>

                </nav>
              </div>

              <!--多选!-->
              <div th:class="${#strings.equals(oms,'more')?'tab-pane fade active in ':'tab-pane fade'}" class="tab-pane fade" id="profile-basic">
                <div class="row">
                  <div class="col-md-2">
                    <label >每页显示展示数量</label>
                  </div>
                  <div class="col-md-2">
                    <div class="form-group">
                      <select id="paginalsizemore1" class="form-control js_select2" name="example-1" >
                        <option value="">请选择</option>
                        <option th:selected="${paginalsizemore==i}?'selected'" th:each="i:${#numbers.sequence(1,100)}">[[${i}]]</option>
                      </select>
                    </div>
                  </div>
                  <div class="col-md-2">
                    <label >根据题目模糊查</label>
                  </div>
                  <div class="col-md-2">
                    <input class="form-control" type="text"  id="moreval1" placeholder="题目">
                  </div>
                  <div class="col-md-2">
                    <button onclick="ymmore(1)" class="btn btn-w-md btn-round btn-success">确定</button>
                  </div>
                </div>
                <table class="table">
                  <thead>
                  <tr>
                    <th>#</th>
                    <th>题目</th>
                    <th>答案</th>
                   <th>操作</th>
                  </tr>
                  </thead>
                  <tbody>
                  <tr th:each="more:${pInfoMore.list}">
                    <th th:text="${more.id}"></th>
                    <td th:text="${more.testQuestionsMoreOpic}"></td>

                    <td th:text="${more.testQuestionsMoreAnswer}"></td>
                      <td>
                        <div class="btn-group">
                        <a class="btn btn-xs btn-default" th:href="@{/study-test-questions-more/upd(id=${more.id})}" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                        <a class="btn btn-xs btn-default" th:href="@{/study-test-questions-more/del(id=${more.id})}" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a>
                      </div>
                      </td>
                  </tr>
                  </tbody>
                </table>
                <nav>
                  <div class="col-md-4">总记录数[[${pInfoMore.total}]] [[${pInfoMore.pageNum}]]/
                    [[${pInfoMore.pages}]]页</div>
                  <ul class="pagination pagination-circle">
                    <li th:class="${pInfoMore.isFirstPage}?'disabled'" >
                      <a href="javascript:;"  th:onclick="'ymmore('+${pInfoMore.prePage}+')'">
                        <span><i class="mdi mdi-chevron-left"></i></span>
                      </a>
                    </li>
                    <li th:class="${page_Num==pInfoMore.pageNum}?'active':''" th:each="page_Num:${pInfoMore.navigatepageNums}">
                      <a  th:onclick="'ymmore('+${page_Num}+')'" href="javascript:;">[[${page_Num}]]</a>
                    </li>
                    <li th:class="${pInfoMore.isLastPage}?'disabled'">
                      <a href="javascript:;" th:onclick="'ymmore('+${pInfoMore.nextPage}+')'">
                        <span><i class="mdi mdi-chevron-right"></i></span>
                      </a>
                    </li>
                  </ul>
                </nav>
              </div>

              <!--简答!-->
              <div th:class="${#strings.equals(oms,'shore')?'tab-pane fade active in':'tab-pane fade'}" class="tab-pane fade" id="messages-basic">
                <div class="row">
                  <div class="col-md-2">
                    <label >每页显示展示数量</label>
                  </div>
                  <div class="col-md-2">
                    <div class="form-group">
                      <select id="paginalsizeshort1" class="form-control js_select2" name="example-1" >
                        <option value="">请选择</option>
                        <option th:selected="${paginalsizeshort==i}?'selected'" th:each="i:${#numbers.sequence(1,100)}">[[${i}]]</option>
                      </select>
                    </div>
                  </div>
                  <div class="col-md-2">
                    <label >根据题目模糊查</label>
                  </div>
                  <div class="col-md-2">
                    <input class="form-control" type="text"  id="shoreval1" placeholder="题目">
                  </div>
                  <div class="col-md-2">
                    <button onclick="ymshore(1)" class="btn btn-w-md btn-round btn-success">确定</button>
                  </div>
                </div>
                <table class="table">
                  <thead>
                  <tr>
                    <th>#</th>
                    <th>题目</th>
                    <th>答案</th>
                   <!--<th>操作</th>-->
                  </tr>
                  </thead>
                  <tbody  >
                  <tr th:each="short:${pInfoShor.list}">
                    <th th:text="${short.id}"text-maxlength="10"></th>
                    <td th:text="${short.testQuestionsShortanswerOpic}"text-maxlength="10"></td>
                      <td> <textarea name="txt" clos="20"rows="5" wrap="virtual"th:text="${short.testQuestionsShortanswerAnswer}"></textarea></td>
                     <!-- <div>
                        <a class="btn btn-xs btn-default" th:href="@{/study-test-questions-one/upd(id=${list.id})}" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                        <a class="btn btn-xs btn-default" th:href="@{/study-test-questions-one/del(id=${list.id})}" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a>
                      </div>-->
                  </tr>
                  </tbody>
                </table>
                <nav>
                  <div class="col-md-4">总记录数[[${pInfoShor.total}]] [[${pInfoShor.pageNum}]]/
                    [[${pInfoShor.pages}]]页</div>
                  <ul class="pagination pagination-circle">
                    <li th:class="${pInfoShor.isFirstPage}?'disabled'" >
                      <a href="javascript:;"  th:onclick="'ymshore('+${pInfoShor.prePage}+')'">
                        <span><i class="mdi mdi-chevron-left"></i></span>
                      </a>
                    </li>
                    <li th:class="${page_Num==pInfoShor.pageNum}?'active':''" th:each="page_Num:${pInfoShor.navigatepageNums}">
                      <a  th:onclick="'ymshore('+${page_Num}+')'" href="javascript:;">[[${page_Num}]]</a>
                    </li>
                    <li th:class="${pInfoShor.isLastPage}?'disabled'">
                      <a href="javascript:;" th:onclick="'ymshore('+${pInfoShor.nextPage}+')'">
                        <span><i class="mdi mdi-chevron-right"></i></span>
                      </a>
                    </li>

                  </ul>

                </nav>

              </div>
            </div>

          </div>
        </div>
      </div>

    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" th:src="@{~/js/jquery.min.js}" src="js/jquery.min.js"></script>
<script type="text/javascript" th:src="@{~/js/bootstrap.min.js}" src="js/bootstrap.min.js"></script>
<script type="text/javascript" th:src="@{~/js/perfect-scrollbar.min.js}" src="js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" th:src="@{~/js/main.min.js}" src="js/main.min.js"></script>

<!--图表插件-->
<script type="text/javascript" th:src="@{~/js/Chart.js}" src="js/Chart.js"></script>
<script type="text/javascript">
  function ymone(pn){
    var oneval1=$("#oneval1").val();
    var paginalsizeone1=$("#paginalsizeone1").val();
    var moreval1=$("#moreval1").val();
    var paginalsizemore1=$("#paginalsizemore1").val();
    var shoreval1=$("#shoreval1").val();
    var paginalsizeshort1=$("#paginalsizeshort1").val();
  if(pn==0){
    return
  }
    $("#pnone").attr("value", pn);
    $("#paginalsizeone").attr("value", paginalsizeone1);
    $("#oneval").attr("value", oneval1);
    $("#paginalsizemore").attr("value", paginalsizemore1);
    $("#moreval").attr("value", moreval1);
    $("#paginalsizeshort").attr("value", paginalsizeshort1);
    $("#shoreval").attr("value", shoreval1);
    $("#oms").attr("value", "one");
    $("#biao").submit();

  }
  function ymshore(pn){
    var oneval1=$("#oneval1").val();
    var paginalsizeone1=$("#paginalsizeone1").val();
    var moreval1=$("#moreval1").val();
    var paginalsizemore1=$("#paginalsizemore1").val();
    var shoreval1=$("#shoreval1").val();
    var paginalsizeshort1=$("#paginalsizeshort1").val();
    if(pn==0){
      return
    }
    $("#pnshort").attr("value", pn);
    $("#paginalsizeone").attr("value", paginalsizeone1);
    $("#oneval").attr("value", oneval1);
    $("#paginalsizemore").attr("value", paginalsizemore1);
    $("#moreval").attr("value", moreval1);
    $("#paginalsizeshort").attr("value", paginalsizeshort1);
    $("#shoreval").attr("value", shoreval1);
    $("#oms").attr("value", "shore");
    $("#biao").submit();

  }
  function ymmore(pn){
    var oneval1=$("#oneval1").val();
    var paginalsizeone1=$("#paginalsizeone1").val();
    var moreval1=$("#moreval1").val();
    var paginalsizemore1=$("#paginalsizemore1").val();
    var shoreval1=$("#shoreval1").val();
    var paginalsizeshort1=$("#paginalsizeshort1").val();
    if(pn==0){
      return
    }
    $("#pnmore").attr("value", pn);
    $("#paginalsizeone").attr("value", paginalsizeone1);
    $("#oneval").attr("value", oneval1);
    $("#paginalsizemore").attr("value", paginalsizemore1);
    $("#moreval").attr("value", moreval1);
    $("#paginalsizeshort").attr("value", paginalsizeshort1);
    $("#shoreval").attr("value", shoreval1);
    $("#oms").attr("value", "more");
    $("#biao").submit();

  }
$(document).ready(function(e) {
    var $dashChartBarsCnt  = jQuery( '.js-chartjs-bars' )[0].getContext( '2d' ),
        $dashChartLinesCnt = jQuery( '.js-chartjs-lines' )[0].getContext( '2d' );

    var $dashChartBarsData = {
		labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
		datasets: [
			{
				label: '注册用户',
                borderWidth: 1,
                borderColor: 'rgba(0,0,0,0)',
				backgroundColor: 'rgba(51,202,185,0.5)',
                hoverBackgroundColor: "rgba(51,202,185,0.7)",
                hoverBorderColor: "rgba(0,0,0,0)",
				data: [2500, 1500, 1200, 3200, 4800, 3500, 1500]
			}
		]
	};
    var $dashChartLinesData = {
		labels: ['2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014'],
		datasets: [
			{
				label: '交易资金',
				data: [20, 25, 40, 30, 45, 40, 55, 40, 48, 40, 42, 50],
				borderColor: '#358ed7',
				backgroundColor: 'rgba(53, 142, 215, 0.175)',
                borderWidth: 1,
                fill: false,
                lineTension: 0.5
			}
		]
	};

    new Chart($dashChartBarsCnt, {
        type: 'bar',
        data: $dashChartBarsData
    });

    var myLineChart = new Chart($dashChartLinesCnt, {
        type: 'line',
        data: $dashChartLinesData,
    });
});
</script>
</body>
</html>